using UnityEngine;
using UnityEngine.EventSystems;

namespace MaterialUI
{
	[AddComponentMenu("MaterialUI/Dialogs/Background", 100)]
	public class DialogBackground : MonoBehaviour, IPointerClickHandler, IEventSystemHandler
	{
		private DialogAnimator m_DialogAnimator;

		public DialogAnimator dialogAnimator
		{
			get
			{
				return m_DialogAnimator;
			}
			set
			{
				m_DialogAnimator = value;
			}
		}

		public void OnPointerClick(PointerEventData eventData)
		{
			if (m_DialogAnimator != null)
			{
				m_DialogAnimator.OnBackgroundClick();
			}
		}
	}
}
